Skip to content

fix(basemgr): trailing newline in FreeSWITCH Backgrounding stderr check#212

Open
brancan wants to merge 1 commit intohnimminh:masterfrom
brancan:pr/basemgr-freeswitch-backgrounding-newline
Open

fix(basemgr): trailing newline in FreeSWITCH Backgrounding stderr check#212
brancan wants to merge 1 commit intohnimminh:masterfrom
brancan:pr/basemgr-freeswitch-backgrounding-newline

Conversation

@brancan
Copy link
Copy Markdown

@brancan brancan commented May 7, 2026

Problem

fsinstance() in basemgr.py checks FreeSWITCH stderr to detect a successful background start:

# Before
if stderr and not stderr.endswith('Backgrounding.'):
    result = False
    logger.error(...)

FreeSWITCH actually outputs Backgrounding.\n (with a trailing newline). The old check always evaluates to True on a normal startup, so every successful FreeSWITCH launch logs a false ERROR and sets result = False.

Fix

# After
if stderr and not stderr.endswith('Backgrounding.\n'):

One character change — matches the actual FreeSWITCH output.

Notes

This bug was also independently identified in PR #179. This PR isolates the fix as a standalone, minimal change with no other modifications.

FreeSWITCH stderr ends with 'Backgrounding.\n', not 'Backgrounding.',
so the old endswith check always failed and logged a false ERROR on
every normal startup.
brancan added a commit to brancan/libresbc-fork that referenced this pull request May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant